package com.itheima.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

@Service
public class ServiceB {


//    @Lazy  // 延迟加载  解决循环依赖的问题
    @Autowired
    private ServiceA serviceA;

    public void testB(){
        serviceA.testA();
        System.out.println("B");
    }
}
